<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="/static/jquery-1.11.0.min.js"></script>
<script
	src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.2.2/jquery.form.min.js"
	integrity="sha384-FzT3vTVGXqf7wRfy8k4BiyzvbNfeYjK+frTVqZeNDFl8woCbF0CYG6g2fMEFFo/i"
	crossorigin="anonymous"></script>
</head>
<body>
	<form>
		<input type="file" name="file" id="file"> <input type="submit"
			value="提交">
	</form>

	<script type="text/javascript">
		var url = "/UploadServlet";
		var options = {
			type : 'post',
			url : url,
			success : function(ret) {
				//var tempret = eval('('+ret+')');  
				console.log(ret);
			},
			error : function(responseText, statusText) {
				alert("shang chuan cuo wu");
			}
		};
		$("form").ajaxForm(options);
	</script>
</body>
</html>